#ifndef ENTERTAINMENT_H_INCLUDED
#define ENTERTAINMENT_H_INCLUDED

#include <stdio.h>
#include "mtm_ex1.h"


#define PROPAGATE(res) if(res == RES_FATAL){return RES_FATAL;}

typedef enum 
{
	RES_SUCCESS,
	RES_ERROR,
	RES_FATAL
} result_t;

typedef struct 
{
	const char * keyword;
	result_t (*handler)(FILE * outstream, const char ** args);
} dispatch_t;

typedef struct
{
	char name[MAX_LEN];
	int year;
	char type[MAX_LEN];
} movie_t;

typedef struct
{
	char name[MAX_LEN];
	int start;
	int end
} game_t;

typedef struct
{
	char name[MAX_LEN];
	int count;
	char type[MAX_LEN];
} playlist_t;



#endif
